package com.xiaodou.mjf.entity.core;

import java.util.Date;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Transient;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xiaodou.mjf.entity.core.base.LoanBase;

/***
 *
 * Loan实体定义
 * @author XiaoDou.com Code Generator
 * @version 1.0
 * 2015-03-09 11:18:56
 *
 */
@Entity
@DynamicInsert @DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Loan extends LoanBase implements Serializable{

	/**序列化标识*/
	private static final long serialVersionUID = -553499498444469404L;

	//已使用
	public static Integer FLAG_USE = 1;
	//没有使用
	public static Integer FLAG_NOTUSE = 0;
	
	//放款中
	public static Integer LOAN_STATUS_FOR_LOAN = 5;
	//还款中
	public static Integer LOAN_STATUS_REPAYMENT = 6;
	//已还清
	public static Integer LOAN_STATUS_PAID = 7;
	
    public Loan(){}

    public Loan(String id){
        this.id = id;
    }
    
    @Override
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public Date getApplyDate(){
		return applyDate;
	}
    
    @Override
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public Date getTradeDate(){
		return tradeDate;
	}

    @Override
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public Date getFullScaleDate(){
		return fullScaleDate;
	}

	@Transient
    protected String memberName;

    @Transient
    protected Integer operationType;
    
    @Transient
    protected String financingId;
        
    
    public String getFinancingId() {
		return financingId;
	}

	public void setFinancingId(String financingId) {
		this.financingId = financingId;
	}

	public Integer getOperationType() {
		return operationType;
	}

	public void setOperationType(Integer operationType) {
		this.operationType = operationType;
	}

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	@Transient
    protected String accountNumber;

	public String getAccountNumber() {
		return accountNumber;
	}

	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}
	
	@Transient
    protected String mobile;

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	
}
